<?php
$step = $_GET['step'];
switch($step)
{
	case "2":
	step2();
	break;
	case "3":
	step3();
	break;
	default:
}
echo '
<head>
<title>QuickPage Installation</title></head>
<body>
<font size="7" face="arial">Nexo QuickPage Installation</font>
<br>
Before clicking the button, verify that you have correctly set all settings in config.php.
<br>
<form action="install.php?step=2" method="post">
<input type="submit">
</form>
';

function step2()
{
	include 'config.php';
	$connect = mysql_connect($mysql_host,$mysql_user,$mysql_pass);
	mysql_select_db($mysql_db);
	$query = ('CREATE TABLE `pages` (`Page_ID` int(10) NOT NULL AUTO_INCREMENT, `Content` text NOT NULL, PRIMARY KEY (`Page_ID`)) ENGINE=MyISAM AUTO_INCREMENT=34 DEFAULT CHARSET=latin1;');
$result = mysql_query($query) or die(mysql_error());
die('<font color="#330099">Installation successful if no errors are shown. Delete install.php.</font><br><br><br><br>');
};
?>